package com.atguigu.bigdata.scala.chapter11

object Scala06_Generic {

    def main(args: Array[String]): Unit = {
        // TODO - 泛型 - scala

        def fun[A : Test](a: A) = {
            println(a)
        }

        implicit val test : Test[User] = new Test[User]
        // 如果代码中提示（...），一般情况下是隐式转换有问题
        val user: User = new User()
        fun( user )

    }
    class Test[T] {
    }
    class Parent {

    }
    class User extends Parent{

    }
    class Child extends User {

    }
}
